
//TODO a(58)
function a58(module, exports, a) {
    var i = a(23), s = a(6), r = a(3), n = a(21), o = function (e) {
        this.contDom = e.dom.cont, this.parentEl = e.dom.parentEl, this.coreVideo = e.coreVideo
    };
    r.extend(o, i);
    var l = {
        init: function () {
            this.playerData = this.manager.playerData, this.lanFit = r.bind(this.manager.lanFit.fit, this.manager.lanFit), this.erroCode = "", this.nodes = {
                popTip: this.parentEl.find(".js-poptip"),
                popTipCon: this.parentEl.find(".js-poptip .hv_pop_cnt"),
                optDefi: this.parentEl.find(".clear_ul"),
                shadow: this.parentEl.find(".js-bg"),
                bigPlay: this.parentEl.find(".hv_ico_pasued"),
                loading: this.parentEl.find(".hv_ico_loading"),
                videoCon: this.parentEl.find(".hv_play")
            }, this.nodes.popTip.on("click", this.onTipClick, this), this.manager.evt.on("vjs_showPopTip", function (e) {
                var t = e.args[0], a = e.args[1];
                this.show(t, a)
            }, this), this.manager.listener.on(n.PLAY_STATE, function (e, t) {
                "init" == t && this.hide()
            }, this), this.isClick = !1
        }, onTipClick: function (e) {
            var t = this.lanFit, a = s(e.target).getAttr("type");
            switch (a) {
                case"login":
                    try {
                        this.manager.evt.trigger(n.EVENT.PLAYER_CALLBACK, "openLoginDialog")
                    } catch (e) {
                    }
                    break;
                case"back-home":
                    location.href = "http://" + n.HOST_NAME.WWW_LETV_COM;
                    break;
                case"refresh":
                    location.reload();
                    break;
                case"costTicket":
                    if (this.isClick)return;
                    this.isClick = !0;
                    var i = this;
                    this.jsonp = r.getJSON({
                        url: n.PROTOCAL + n.HOST_NAME.PLAYER_PC_LETV_COM + "/mms/useticket",
                        data: {
                            pid: this.playerData.vinfo.pid || "",
                            vid: this.playerData.vinfo.vid || "",
                            region: this.manager.listener.get(n.REGION)
                        },
                        log: this.manager.log,
                        success: function (e) {
                            i.jsonp = null, i.isClick = !1, 1 == e.code && i.manager.evt.trigger(n.EVENT.PLAYER_COMMAND, "reload")
                        },
                        fail: function () {
                            i.jsonp = null
                        }
                    });
                    break;
                case"close":
                    this.hide();
                    break;
                case"open-app":
                    var o = s(e.target).getAttr("open-type") || "";
                    this.manager.evt.trigger(n.EVENT.PLAYER_CALLBACK, "openApp", {
                        vid: this.playerData.vinfo.vid,
                        openType: o
                    });
                    break;
                case"send-log":
                    var l = prompt(t("请输入您的联系方式"));
                    if ("" == r.trim(l))return void alert(t("联系方式为空"));
                    this.manager.log.send({
                        errno: this.erroCode,
                        phone: l,
                        forceSend: !0
                    }), e.target.innerHTML = t("反馈成功"), e.target.removeAttribute("type")
            }
        }, show: function (e, t) {
            var a = this.lanFit, i = this.manager.playerData.config.lan, s = "";
            switch (t = t || {}, this.erroCode = "", e) {
                case"paynotLoginMember":
                    s = ['<p class="hv_font14">', a("本片为付费影片，开通会员可免费观看"), "</p>", '<p class="hv_font14">', a("已是会员"), ' <a href="javascript:void(0);" type="login" class="hv_org">', a("立即登录"), "</a></p>"].join("");
                    break;
                case"payLoginMember":
                    s = ['<p class="hv_font14">', a("本片为付费影片，开通会员可免费观看"), "</p>"].join("");
                    break;
                case"loginMember":
                    s = ['<p class="hv_font14">', a("试看已结束，继续观看请开通会员"), "</p>", '<p class="hv_font14">', a("已是会员"), ' <a href="javascript:void(0);" type="login" class="hv_org">', a("立即登录"), "</a></p>"].join("");
                    break;
                case"openGlobalMember":
                    s = ['<p class="hv_font14">', a("试看已结束，继续观看请开通"), "</p>", '<p class="hv_font14"><span class="hv_org">', t, "</span></p>"].join("");
                    break;
                case"useTicket":
                    s = ['<p class="hv_font12">', a("试看已结束，继续观看需使用1张观影卷(现有"), '<span class="hv_org">', t, "</span>", a("张"), ")</p>", '<p class="hv_font12 hv_opa">', a("使用观影券48小时内可重复观看当前影片"), "</p>", '<p><a href="javascript:void(0);" type="costTicket" class="hv_btn_org">', a("立即使用"), "</a></p>"].join("");
                    break;
                case"noMoreTicket":
                    s = ['<p class="hv_font14">', a("试看已结束，本月赠送的观影卷已用完"), "</p>"].join("");
                    break;
                case"appGuideEnd":
                    s = ['<p class="hv_font14">', this.playerData.tryLookTime, a("分钟试看已结束"), "</p>", '<p class="hv_font14">', a("使用乐视视频APP观看完整版"), "</p>", '<p><a href="javascript:void(0);" type="open-app" open-type="app-guide" class="hv_btn_org">', a("观看完整版"), "</a></p>"].join("");
                    break;
                case n.ERROR_CODE.GSLB_SERVER_PRESSURE_LARGE:
                    this.erroCode = e, s = ['<p class="hv_font14">', a("人太多挤爆啦，工程师正在抢修"), "</p>", '<p class="hv_font14">', a("稍后试试看"), "</p>"].join("");
                    break;
                case n.ERROR_CODE.USER_ABNORMAL:
                    s = "en" == i ? '<p class="hv_font12">' + a("检测您帐号有异常，会员服务已冻结,如有问题请联系客服") + ": 4000300104</p>" : ['<p class="hv_font12">', a("检测您帐号有异常，会员服务已冻结"), "</p>", '<p class="hv_font12">', a("如有问题请联系客服"), "：4000300104</p>"].join("");
                    break;
                case n.ERROR_CODE.COPY_RIGHT_BAN:
                    this.erroCode = e, s = ['<p class="hv_font14">', a("因版权方要求，暂不能观看"), "</p>"].join("");
                    break;
                case n.ERROR_CODE.OFFLINE:
                    this.erroCode = e, s = ['<p class="hv_font14">', a("很抱歉，您看的视频已经下线了"), "</p>"].join("");
                    break;
                case n.ERROR_CODE.AREA_BAN:
                    this.erroCode = e, s = '<p class="hv_font14">' + a("该内容不支持在当前地区观看") + "</p>";
                    break;
                case"firstLook":
                    s = ['<p class="hv_font14">', a("使用乐视视频APP，抢先观看当前视频"), "</p>"].join(""), "MPlayer" == this.playerData.pname && (s += '<p><a href="javascript:void(0);" type="open-app" open-type="firstlook" class="hv_btn_blue">' + a("前往观看") + "</a></p>");
                    break;
                case"authBan":
                    s = "en" == i ? ['<p class="hv_font14">', a("当前视频需要使用乐视视频APP观看，高清更流畅"), "</p>", '<p><a href="javascript:void(0);" type="open-app" open-type="auth-ban"  class="hv_btn_blue">', a("立即观看"), "</a></p>"].join("") : ['<p class="hv_font16">', a("当前视频需要使用"), "</p>", '<p class="hv_font16">', a("乐视视频APP观看，高清更流畅"), "</p>", '<p><a href="javascript:void(0);" type="open-app" open-type="auth-ban"  class="hv_btn_blue">', a("立即观看"), "</a></p>"].join("");
                    break;
                case"vikiBan":
                    s = ['<p class="hv_font14">', a("由于版权原因"), "</p>", '<p class="hv_font14">', a("该视频暂不支持在此平台播放"), "</p>"].join("");
                    break;
                case n.ERROR_CODE.AUTH_DATA_EMPTY:
                    this.erroCode = e, s = ['<p class="hv_font14">', a("缺少可播放的视频数据"), "</p>"].join("");
                    break;
                case n.ERROR_CODE.DRM_BAN:
                    this.erroCode = e, s = ['<p class="hv_font14">', a("受视频格式限制，该内容不支持观看"), "</p>", '<p class="hv_font14">', a("欢迎观看其他精彩内容"), "</p>"].join("");
                    break;
                case n.ERROR_CODE.AUTH_TIMEOUT:
                case n.ERROR_CODE.AUTH_ARGS_ERR:
                case n.ERROR_CODE.AUTH_TIME_SERVER_ERROR:
                case n.ERROR_CODE.AUTH_COOKIE_RETRY_ERROR:
                case n.ERROR_CODE.GSLB_TIMEOUT:
                case n.ERROR_CODE.GSLB_ERROR:
                case n.ERROR_CODE.TOKEN_TIMEOUT:
                case n.ERROR_CODE.GSLB_DATA_EMPTY:
                case n.ERROR_CODE.URL_NOT_SUPPORT_MP4:
                case n.ERROR_CODE.URL_NOT_SUPPORT_M3U8:
                case n.ERROR_CODE.ERROR:
                    this.erroCode = e, s = ['<p class="hv_font14">', a("视频无法播放"), ' <a type="send-log" href="javascript:void(0);" class="hv_blu">', a("提交反馈"), "</a></p>", '<p class="hv_font12"><a type="refresh" href="javascript:void(0);" class="hv_blu">', a("刷新重试"), "</a></p>"].join("")
            }
            s && (this.erroCode && (s += '<p class="hv_font12">' + this.lanFit("反馈码") + "：" + this.erroCode + "</p>"), this.manager.evt.trigger(n.EVENT.PLAYER_COMMAND, "pause"), setTimeout(r.bind(function () {
                this.manager.listener.set(n.PLAY_STATE, "stop"), this.nodes.popTipCon[0].innerHTML = s, this.nodes.popTip[0].style.display = "block", this.nodes.shadow[0].style.display = "block", this.parentEl.addClass("hv_box_hide"), this.nodes.optDefi.removeClass("hover"), this.nodes.videoCon[0].style.display = "none", this.nodes.bigPlay[0].style.display = "none", this.manager.evt.trigger("vjs_hideLoading"), this.manager.evt.trigger(n.EVENT.PLAYER_CALLBACK, "SHOW_MESSAGE", {type: e}), this.manager.evt.trigger(n.EVENT.PLAYER_COMMAND, "changFullScreen", 0)
            }, this), 0))
        }, hide: function () {
            this.nodes.videoCon[0].style.display = "block", this.nodes.popTip[0].style.display = "none", this.nodes.shadow[0].style.display = "none"
        }
    };
    r.merge(o.prototype, l), module.exports = o
}

